#pragma once
#include <king/Engine.h>
#include <king/Updater.h>
#include <vector>
#include <map>
#include "Diamond.h"
#include "GameManager.h"
#include <time.h>

namespace King {
	enum MouseState
	{
		kNull,
		kClickStart,
		kDragging,
		kClickEnd,
	};

	class DiamondGame : public Updater
	{
	public:
		DiamondGame();
		~DiamondGame();

		void Start();

		void Update();

		void Render();

		void Swap(const DiamondIndex& first, const DiamondIndex& second);

	private:
		King::Engine					mEngine;
		std::map<DiamondIndex, Diamond>	mDiamondMap;
		bool							mLastFrameMouseDown;

		MouseState						mMouseState;
		DiamondPoint					mMouseClickStartPoint;
		DiamondPoint					mMouseCurrentPoint;

		DiamondIndex					mSelectedDiamondIndex;
	};

}